<?php 

class Modules_Common_DB_ProjectHasMilestones extends BaseObject
{
	public static function GetTableName() {
        return 'projects_has_milestones';
    }
    public static function &ById($id) {
        self::GetById($id);
    }
    public static function &SearchByProject($id)
    {
    	$mcdt=new Modules_Common_DB_ProjectHasMilestones();
    	if(count(($ids=$mcdt->GetIds('WHERE projects_id="'.Mysql::EscapeString($id).'"')))>0)
        	return $mcdt->GetByIds($ids);
        else
        	return array();
    }
	 public static function &SearchByBacklog($id)
	    {
	    	$mcdt=new Modules_Common_DB_ProjectHasMilestones();
    	if(count(($ids=$mcdt->GetIds('WHERE milestones_id="'.Mysql::EscapeString($id).'"')))>0)
        	return $mcdt->GetByIds($ids);
        else
        	return array();
	    }
	
	}
?>